
const path = require('path')

const resolve = dir => {
  return path.join(__dirname, dir)
}

module.exports = {
  chainWebpack: config => {
    config.resolve.symlinks(true)
    config.resolve.alias
      .set('@', resolve('src'))
      .set('_c', resolve('src/components'))
  },
  pages: {
    index: {
      // page 的入口
      entry: 'src/main.js',
      // 模板来源
      // template: 'public/index.html',
      // 在 dist/index.html 的输出
      // filename: 'index.html',
      title: '无名'
    }
  },
  productionSourceMap: false,
  devServer: {
    hot: true,
    open: true,
    port: 8888,
    proxy: {
      '/': {
        target: 'http://localhost:8080/'
      }
    },
  }
}
